<script>
export default {
  name: 'ShowMemos',
  props: ['memos'],
methods: {
  delMemo(index) {
    this.$emit('deleteMemo', index)
  }
}
}
</script>

<template>
<table>
<tr>
  <th>编号</th>

  <th>内容</th>
  <th>操作</th>
</tr>
<tr v-for="(memo, index) in memos" :key="memo.id">
  <td>{{memo.id}}</td>

  <td>{{memo.content}}</td>
  <td>
  <input type="button" value="删除" @click="delMemo(index)">

  </td>
</tr>
</table>
</template>

<style scoped></style>